//done
#pragma once
// 车基类
class Car
{
private:
  /**
   * @description: 描述车辆运行相关参数
   * @param {
   *    speed：当前车速
   *    distance: 车辆当前距离交叉口距离
   *    t1: 发生冲突时间
   *    td: 排队车辆消散时间
   *    tg: 当前剩余绿灯时间
   *    a : 车辆加速度
   * }  
   * @return
   * @src
   */  
  double speed;
  double distance;
  double t1;
  double td;
  double tg;
  double a;
public:
  double getCurSpeed();
  double getCurDistance();
  double getCurTime_t1();
  double getCurTime_td();
  double getCurTime_tg();
  double getAccelerated();
  void setSpeed(double v);
  void setDistance(double s);
  void setTime_t1(double time);
  void setTime_td(double time);
  void setTime_tg(double time);
  void setAccelerated(double accelerate);
public:
  // 默认构造函数 0
  Car()
  {
    ;
  }
  // 构造函数 1
  Car(double v, double s = 10.0);
  // 析构函数
  ~Car()
  {
    ;
  }
};
void print(Car& emergency, Car& team);
int getRandomGreen();
void initializer(Car& emergency, Car& team);
void processGreen(Car& emergency, Car& team);
void processRed(Car& emergency, Car& team);